[#assign PayMode = {"0" : "线下支付", "1" : "快钱在线支付", "2" : "浙商在线支付", "3" : "平安银行在线支付"}]
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
    <link href="/res/third/bootstrap3/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <link href="/res/back/css/base.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        b{
            margin: 5px 0px;
            display: block;
            padding-left: 20px;
        }
        .table-condensed>tbody>tr>td,
        .table-condensed>tbody>tr>th,
        .table-condensed>tfoot>tr>td,
        .table-condensed>tfoot>tr>th,
        .table-condensed>thead>tr>td,
        .table-condensed>thead>tr>th{
            padding: 10px;
        }
        .panel-heading th{
            text-align: right;
            font-weight: normal;
            color: #999;
        }
        body{
            font-size: 12px;
        }
        .panel-info>.panel-heading{
            background-color: white;
            color: #666;
        }
        .panel-info>.panel-heading{
            border-color: #ebebeb;
        }
    </style>
    
</head>
<body>
<div class="panel panel-info panel-content" style="overflow: auto; padding: 10px;">
    <div class="panel-heading">
        <table>
            <tr>
                <th>订单编号：</th>
                <td>${order.orderNumber!}</td>
                <td class="w80 "></td>
                <th>当前状态：</th>
                <td>${orderStateMap[order.state?string]!}</td>
                <td class="w80 "></td>
                <th>订单时间：</th>
                <td>${order.ordertime?datetime!}</td>
            </tr>
            <tr>
                <th>卖家：</th>
                <td>${seller.companyName!}</td>
                <td class="w80 "></td>
                <th>买家：</th>
                <td>${buyer.companyName!}</td>
                <td class="w80 "></td>
            </tr>
        </table>
    </div>
    <b>支付信息</b>
    <table class="table table-hover table-bordered">
        <tr>
            <th width="15%;">批次</th>
            <th width="20%;">应付金额</th>
            <th width="20%;">安装币抵扣</th>
            <th width="20%;">实付金额</th>
            <th>实付时间</th>
            <th>支付方式</th>
        </tr>
        [#list payList as pay]
        <tr>
            <td>第${pay_index + 1}批</td>
            <td>${pay.totalPrice!}</td>
            <td>${pay.dePrice!0}</td>
            <td>${pay.totalPrice - pay.dePrice!0}</td>
            <td>${pay.payTime?datetime!}</td>
            <td>${PayMode[pay.payMode?string]}</td>
        </tr>
        [/#list]
    </table>
    <b>发货信息</b>
    <table class="table table-hover table-bordered">
        <tr>
            <th width="15%;">批次</th>
            [#if order.ordertype == 2]
            <th width="20%;">请货金额</th>
            <th width="20%;">请货时间</th>
            [/#if]
            <th width="20%;">已发货金额</th>
            <th>发货时间</th> 
        </tr>
        [#list shipList as ship]
        <tr>
            <td>第${ship_index + 1}批</td>
            [#if order.ordertype == 2]
                <td>${ship.totalPrice!}</td>
                <td>[#if ship.createtime??]${ship.createtime?datetime!}[/#if]</td>
            [/#if]
            <td>
                [#if ship.shipState! == 0]未发货[#else]${ship.totalPrice!}[/#if]
            </td>
            <td>[#if ship.shipState! > 0][#if ship.shipTime??]${ship.shipTime?datetime!}[/#if][/#if]</td>
        </tr>
        [/#list]
    </table>
    <b>收货信息</b>
    <div class="panel-heading">
        <table>
            <tr>
                <th>姓名：</th>
                <td>${order.receiptName!}</td>
                <td class="w80 "></td>
                <th>收货地址：</th>
                <td>${order.receiptAddress!}</td>
                <td class="w80 "></td>
                <th>联系电话：</th>
                <td>${order.receiptTel!}</td>
            </tr>
        </table>
    </div>
    <b>发票信息</b>
    <div class="panel-heading">
        <table>
            <tr>
                <th>发票类型：</th>
                <td>
                    [#if order.invoice??]
                        [#if order.invoice == 1]无[/#if]
                        [#if order.invoice == 2]增值税普通发票[/#if]
                        [#if order.invoice == 3]增值税专用发票[/#if]
                    [/#if]
                </td>
                <td class="w80"></td>
                <th>[#if order.invoice?? && order.invoice == 2]发票抬头：[/#if]</th>
                <td>[#if order.invoice?? && order.invoice == 2]${order.taxTitle!}[/#if]</td>
                <td class="w80"></td>
                <th></th>
                <td></td>
            </tr>
            [#if order.invoice?? && order.invoice == 3]
            <tr>
                <th>公司名称：</th>
                <td>[#if topBuyer??]${topBuyer.companyName!}[#else]${buyer.companyName!}[/#if]</td>
                <td class="w80"></td>
                <th>纳税人识别号：</th>
                <td>${order.taxNumber!}</td>
                <td class="w80"></td>
                <th>注册地址：</th>
                <td>${order.taxAddress!}</td>
            </tr>
            <tr>
                <th>注册电话：</th>
                <td>${order.taxPhone!}</td>
                <td class="w80"></td>
                <th>开户银行：</th>
                <td>${order.taxOpenbank!}</td>
                <td class="w80"></td>
                <th>开户账号：</th>
                <td>${order.taxBankNumber!}</td>
            </tr>
            [/#if]
        </table>
    </div>

    [#--<b>项目信息</b>
    <div class="panel-heading">
        <table>
            <tr>
                <th>项目名称：</th>
                <td>${order.projectName!}</td>
                <td class="w80"></td>
                <th>甲方名称：</th>
                <td>${order.customerName!}</td>
                <td class="w80"></td>
                <th>报价截止时间：</th>
                <td>${order.deadline?date!}</td>
            </tr>
        </table>
    </div>--]

    <table class="table table-hover table-bordered table-striped table-condensed">
        <tr>
            <th>${seller.companyName!}</th>
            [#if order.ordertype == 1]
                <th>规格</th>
            [#else]
                <th>品牌</th>
                <th>型号</th>
            [/#if]
            <th>单价（元）</th>
            <th>数量</th>
            <th>小计（元）</th>
        </tr>
        [#list itemList as item]
        <tr>
            <td>${item.productName!}</td>
            [#if order.ordertype == 1]
                <td>${item.skuStr!}</td>
            [#else]
                <td>${item.brand!}</td>
                <td>${item.model!}</td>
            [/#if]
            <td>${item.price!}</td>
            <td>${item.quantity!}</td>
            <td>${item.totalPrice!}</td>
        </tr>
        [/#list]
    </table>
    <span>留言内容:${order.message!}</span>
</div>

<script src="/res/common/js/jquery.1.9.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
</script>
</body>
</html>
